{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <!-- 表单头部 -->
                <div class="box-header with-border">
                    <div class="btn-group">

                    </div>
                </div>
                <!-- 表单 -->
                <form id="dataForm" class="form-horizontal dataForm" action="" method="post"
                      enctype="multipart/form-data">
                    <!-- 表单字段区域 -->
                    <div class="box-body">
                    <div style="padding: 10px; border: 2px solid red;border-bottom: none;">
                        <div class="form-group">
                            <label style="width: 36%;" for="invitationpoolnum" class="col-sm-2 control-label">平台【邀请奖池】现有油票数</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="invitationpoolnum"  name="invitationpoolnum" value="{$invitationpoolnum}" readonly type="text" class="form-control field-text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label style="width: 36%;" for="circle_money" class="col-sm-2 control-label">平台【圈层奖池】现有油票数</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="circle_money"  name="circle_money" value="{$circle_money}" type="text" readonly class="form-control field-text">
                            </div>
                        </div>

                        {foreach name='data' id='item' key='data_key'}
                        {if in_array($item.config_key,['circle_rate','platform_rate','invite_rate','onecarveupbl','twocarveupbl','threecarveupbl'])}
                        <div class="form-group">
                            <label style="width: 36%;" for="{$item.config_key}" class="col-sm-2 control-label">{$item.config_remarks}</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="{$item.config_key}"  name="{$item.config_key}" value="{$item.config_value}" type="number" class="form-control field-text">
                            </div>
                        </div>
                        {/if}
                        {/foreach}
                    </div>

                    <div style="padding: 10px; border: 2px solid red;border-bottom: none;">
                        {foreach name='data' id='item' key='data_key'}
                        {if in_array($item.config_key,['giftsybl','txetsybl','audiosybl','videosubl'])}
                        <div class="form-group">
                            <label style="width: 36%;color: red;" for="{$item.config_key}" class="col-sm-2 control-label">{$item.config_remarks}</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="{$item.config_key}"  name="{$item.config_key}" value="{$item.config_value}" type="number" class="form-control field-text">
                            </div>
                        </div>
                        {elseif in_array($item.config_key,['czjlsjbl','czjlsjblhbd','czjlssjbl','czjlssjblhbd','czjlsssjbl','czjlsssjblhbd','czjlssssjbl','czjlssssjblhbd'])}
                        <div class="form-group">
                            <label style="width: 36%;color: green;" for="{$item.config_key}" class="col-sm-2 control-label">{$item.config_remarks}</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="{$item.config_key}"  name="{$item.config_key}" value="{$item.config_value}" type="number" class="form-control field-text">
                            </div>
                        </div>
                        {elseif in_array($item.config_key,['txetsybl','audiosybl','videosubl','giftsybl','txetsyblsj','audiosyblsj','videosublsj','giftsyblsj','txetsyblssj','audiosyblssj','videosublssj','giftsyblssj','txetsyblsssj','audiosyblsssj','videosublsssj','giftsyblsssj'])}
                        <div class="form-group">
                            <label style="width: 36%;color: blue" for="{$item.config_key}" class="col-sm-2 control-label">{$item.config_remarks}</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="{$item.config_key}"  name="{$item.config_key}" value="{$item.config_value}" type="number" class="form-control field-text">
                            </div>
                        </div>
                        {elseif in_array($item.config_key,['textmfcs','audiomfcs','videomfcs','giftmoneyts','audiogrqyxzfz','videogrqyxzfz','boywzltmfcs','wzltfy','ypltmfzypssf','spltmfzypssf'])}
                        <div class="form-group">
                            <label style="width: 36%;" for="{$item.config_key}" class="col-sm-2 control-label">{$item.config_remarks}</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="{$item.config_key}"  name="{$item.config_key}" value="{$item.config_value}" type="number" class="form-control field-text">
                            </div>
                        </div>
                        {/if}
                        {/foreach}
                    </div>

                    <div style="padding: 10px; border: 2px solid red;">
                        {foreach name='data' id='item' key='data_key'}
                        {if in_array($item.config_key,['yqylword','watchtaskrule','fbspylrule'])}
                        <div class="form-group">
                            <label style="width: 36%;" for="{$item.config_key}" class="col-sm-2 control-label">{$item.config_remarks}</label>
                            <div class="col-sm-10 col-md-4">
                                <textarea id="{$item.config_key}" name="{$item.config_key}" type="text/plain" style="height: 150px;width: 100%;">{$item.config_value|raw|default=''}</textarea>
                            </div>
                        </div>
                        {elseif in_array($item.config_key,['zczsbgs','clrzcgyqzjlbg','clrzcgyqz','qunlwlqbl'])}
                        <div class="form-group">
                            <label style="width: 36%;" for="{$item.config_key}" class="col-sm-2 control-label">{$item.config_remarks}</label>
                            <div class="col-sm-10 col-md-4">
                                <input id="{$item.config_key}"  name="{$item.config_key}" value="{$item.config_value}" type="number" class="form-control field-text">
                            </div>
                        </div>
                        {/if}
                        {/foreach}
                    </div>

                        <input type="hidden" name="edit_config" value="edit_config">
                    </div>
                    <!-- 表单底部 -->
                    <div class="box-footer">
                        <div class="col-sm-2" style="width: 36%;">
                        </div>
                        <div class="col-sm-10 col-md-4">
                            <div class="btn-group">
                                <button type="submit" class="btn flat btn-info dataFormSubmit">
                                    确认更新配置
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
<script>
    /** 表单验证 **/
    $('#dataForm').validate({
        rules: {
            'customerservicephone': {
                required: true,
            },
        },
        messages: {
            'customerservicephone': {
                required: '请填写完整信息',
            },
        }
    });
</script>
{/block}